<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@include file="common.jsp"%>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>车辆信息录入</title>
<link rel="shortcut icon" href="favicon(1).ico" type="${basePath}/images/x-icon" />
<link rel="stylesheet" type="text/css" href="${basePath}/css/car.css">
<link href="${basePath}/SpryAssets/SpryValidationPassword.css" rel="stylesheet"
	type="text/css">
<link href="${basePath}/SpryAssets/SpryValidationTextarea.css" rel="stylesheet"
	type="text/css">
<script src="${basePath}/SpryAssets/SpryValidationPassword.js"
	type="text/javascript"></script>
<script src="${basePath}/SpryAssets/SpryValidationTextarea.js"
	type="text/javascript"></script>

 <script type="text/javascript">
          $(function(){
			  
			  $(".box3 .form1 input[type=checkbox]").click(function(){
				  $(".box3 .form2 .chudeng").css("display","none");
				  $(".box3 .form2 .goumai").css("display","block");
				  
				  });
			  
			  
			  });
      	var carTypes;
          function showCar(){
      		jQuery.ajax({
      		        url: '${basePath}/GetCarTypes.do',
      		        cache: false,
      		        type: 'post',
      		        data:{"carinfo":$("#car").val()},
      		        beforeSend: function() {
      		       	  layer.open({
           			  type: 1,
           			  area: ['1300px', '560px'],
           			  title: '车辆明细',
           			  maxmin: true,
           			  shadeClose: true, //点击遮罩关闭
           			  content:'查询中请稍后·····' 
           			  ,btnAlign: 'c'
           			  ,offset: 't'
           			  ,btn: ['确认', '取消']
           	 		  ,yes: function(index, layero){
           	  		  //按钮【按钮一】的回调
           						 }
           			 ,btn2: function(index, layero){
           			  return true;
           			 //开启该代码可禁止点击该按钮关闭
           			}
           	 }); 
      		        },
      		        success: function(data, textStatus) {
      		        	 var jsonobj=eval('('+data+')');  
      		       var html = '<table class="layui-table" lay-even="" lay-skin="nob"><thead><tr> <th>选择</th><th>车型名称</th><th>排量</th><th>载客量</th><th>上市年份</th><th>行业名称</th><th>车辆产地</th><th>核载质量</th><th>整备质量</th><th>燃料种类</th><th>参考价</th><th>行业车型代码</th><th>车型代码</th></tr></thead><tbody>';
      		        var end_html='</tbody></table>';
      		        var htmls="";
      		       	$(".layui-layer-content").empty();
      		      $(".layui-layer-content").html(html);
      		       	 $.each(jsonobj, function (index, value) {
      		       	htmls = '<tr><td><input type="radio" name="carradio" id="carradio'+index+'" lay-skin="primary"></td>';
      		      htmls += '<td>' + value.standardName + '</td>';
					htmls += '<td>' + value.exhaustScale + '</td>';
					htmls += '<td>' + value.seatCount + '</td>';
					htmls += '<td>' + value.marketDate + '</td>';
					htmls += '<td>' + value.platModelName + '</td>';

					htmls += '<td>' + value.importFlag + '</td>';
					htmls += '<td>' + value.tonCount + '</td>';					
					htmls += '<td>' + value.vehicleWeight + '</td>';					

					htmls += '<td>' + value.fuleType + '</td>';
					htmls += '<td>' + value.purchasePrice + '</td>';
					htmls += '<td>' + value.platModelCode + '</td>';
					htmls += '<td>' + value.modelCode + '</td>';
					htmls += '</tr>'; 
					$(".layui-table").append(htmls);
					});
      		   	$(".layui-layer-content").append(end_html);   
      		       	 },
      		        error: function(XMLHttpRequest, textStatus) {

      		        },
      		        complete: function() {

      		        }
      		    });
          }
        	  
          </script>
</head>
 
<body>

<div class="main">
  <div class="box1">
<%@include file="header.jsp"%>
    <form id="subForm">
    <div class="main1">
      <div class="box2">
        <div class="nav">
          <ul>
            <li class="dh1"><strong><span>1</span>.填写车辆信息</strong></li>
            <li class="dh2"><strong><span>2</span>.获得车险报价</strong></li>
            <li class="dh3"><strong><span>3</span>.确认并投保</strong></li>
          </ul>
        </div>
        <h3><img src="images/ling.png" >
          <p>欢迎来到中国人寿车险网上投保平台，请你准备好车辆行驶证(新车请准备车辆合格证)，准确填写获得更精准的报价！</p>
        </h3>
        <div class="car">
          <h4>
            <p>车辆信息</p>
          </h4>
        
          
          
          
          <div class="box3">
            <div class="form1" action="" method="get">
              <input name="" type="checkbox" value="" onClick="checked">
              <p>新车未上牌</p>
            </div>
            <div class="form2" action="" method="get">
              <ul class="chezhu">
                <li>车主姓名：</li>
                <li>发动机号：</li>
                <li class="chudeng">初登日期：</li>
                <li class="goumai">购买日期：</li>
                <li>品牌车型：</li>
                <li>所在城市：</li>
              </ul>
              <div class="car1">
                1<input name="" type="text" datatype="*" sucmsg="" nullmsg="请输入车主姓名"  errormsg="">
                2<input name="" type="text">
                <input name="" type="text">
                      <a href="#"><input name="" type="button" value="查询" onclick="showCar()"></a>
                <input name="" type="text" id="car">
              </div>
              <div class="biaozhu"> <span>*</span> <span>*</span> <span>*</span> <span class="last">*</span> </div>
              <ul class="chezhu1">
                <li class="tz1">车牌号：</li>
                <li>VIN码/车架号：</li>
                <li class="tz2">发证日期：</li>
                <li class="tz3">核定载卡量：</li>
              </ul>
              <div class="car2">
                <input name="" type="text">
                <a href="#"><input class="search" name="" type="button" value="查询"  ></a>
                <input name="" type="text">
                <input name="" type="text">
                <input name="" type="text">
              </div>
              <div class="biaozhu"> <span class="bz">*</span> <span>*</span> <span>*</span> <span><b>人</b>*</span> </div>
              <p>
                <label>
                  <input type="radio" name="RadioGroup1" value="单选" id="RadioGroup1_0">
                  郑州市</label>
                <label>
                  <input type="radio" name="RadioGroup1" value="单选" id="RadioGroup1_1">
                  焦作市</label>
                <label>
                  <input type="radio" name="RadioGroup1" value="单选" id="RadioGroup1_1">
                  焦作市</label>
                <label>
                  <input type="radio" name="RadioGroup1" value="单选" id="RadioGroup1_1">
                  焦作市</label>
                <label>
                  <input type="radio" name="RadioGroup1" value="单选" id="RadioGroup1_1">
                  焦作市</label>
                <label>
                  <input type="radio" name="RadioGroup1" value="单选" id="RadioGroup1_1">
                  焦作市</label>
                <label>
                  <input type="radio" name="RadioGroup1" value="单选" id="RadioGroup1_1">
                  焦作市</label>
                <label>
                  <input type="radio" name="RadioGroup1" value="单选" id="RadioGroup1_1">
                  焦作市</label>
                <label>
                  <input type="radio" name="RadioGroup1" value="单选" id="RadioGroup1_1">
                  焦作市</label>
                <label>
                  <input type="radio" name="RadioGroup1" value="单选" id="RadioGroup1_1">
                  焦作市</label>
                <label>
                  <input type="radio" name="RadioGroup1" value="单选" id="RadioGroup1_1">
                  焦作市</label>
                <label>
                  <input type="radio" name="RadioGroup1" value="单选" id="RadioGroup1_1">
                  焦作市</label>
                <label>
                  <input type="radio" name="RadioGroup1" value="单选" id="RadioGroup1_1">
                  焦作市</label>
              </p>
            </div>
          </div>
        </div>
        <div class="toubao">
          <h4>
            <p>投保信息</p>
          </h4>
          <div class="form3" action="" method="get">
            <h5>投保人信息</h5>
            <input name="" type="checkbox" value="" checked>
            <p>同车主</p>
          </div>
          <div class="form4" action="" method="get">
            <ul class="tbr">
              <li class="tz4">投保人姓名：</li>
              <li>证件号码：</li>
            </ul>
            <div class="tbr1">
              <input name="" type="text">
              <input name="" type="text">
            </div>
            <div class="tbr2"> <span>*</span> <span>*</span></div>
            <ul class="btb">
              <li>证件类型：</li>
            </ul>
            <div class="btb1">
              <select>
                <option value="" selected>身份证</option>
                <option value="">驾驶证</option>
                <option value="">港澳通行证</option>
              </select>
            </div>
            <div class="btb2"> <span>*</span> </div>
          </div>
          <div class="form3" action="" method="get">
            <h5>被保险人信息</h5>
            <input name="" type="checkbox" value="" checked>
            <p class="tong">同投保人</p>
          </div>
          <div class="form4" action="" method="get">
            <ul class="tbr">
              <li class="tz5">被保险人姓名：</li>
              <li>证件号码：</li>
            </ul>
            <div class="tbr1">
              <input name="" type="text">
              <input name="" type="text">
            </div>
            <div class="tbr2"> <span>*</span> <span>*</span></div>
            <ul class="btb">
              <li>证件类型：</li>
            </ul>
            <div class="btb1">
              <select>
                <option value="" selected>身份证</option>
                <option value="">驾驶证</option>
                <option value="">港澳通行证</option>
              </select>
            </div>
            <div class="btb2"> <span>*</span> </div>
          </div>
        </div>
        <input id="submitBtn" name="" type="submmit" value="下一步">
        
      </div>
    </div>
    </form>
    <div class="wenti"> <img src="images/wenti.png" > </div>
  </div>
</div>
	<script>
	//校验初始化

//校验初始化
/* 
$("#subForm").Validform({
	btnSubmit:"#submitBtn", 
	tiptype:2, 
	ignoreHidden:false,
	dragonfly:false,
	tipSweep:true,
	label:".label",
	showAllError:true,
	postonce:true,
	ajaxPost:true,
	datatype:{
	},
	callback:function(data){
		if(data.status=="y")
		{			
			//setTimeout("window.location.reload(); ",700);
			//alert("callBack");	
			$("#div3").css('display','none');
			$("#div4").css('display','block');
			$("#imgId").attr('src',"${ctx}/view/images/dealier/icon_step3.png"); 
		}
		else
		{
			$("failBdsb").html(data.value);
			$("#bdsb").show();
		}
	}
});  */
$("#submitBtn").click(function(){
	 window.location.href="insurance.do"
	});

	</script>
</body>
</html>
